package cn.appsys.biz.impl;

import java.util.Date;
import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.appsys.biz.AppInfoBiz;
import cn.appsys.dao.AppInfoDao;
import cn.appsys.pojo.AppInfo;
import cn.appsys.pojo.AppVersion;
import cn.appsys.pojo.DataDictionary;

@Service("appInfoBiz")
public class AppInfoBizImpl implements AppInfoBiz {
	@Autowired
	private AppInfoDao appInfoDao;


	public int addAppInfo(AppInfo appInfo) {
		return appInfoDao.addAppInfo(appInfo);
	}

	public int updateAppInfo(AppInfo appInfo) {
		return appInfoDao.updateAppInfo(appInfo);
	}

	public int updateVersion(AppVersion appVersion) {
		return appInfoDao.updateVersion(appVersion);
	}

	public AppInfo getById(int id) {
		return appInfoDao.getById(id);
	}

	public int deleteAppInfo(int id) {
		return appInfoDao.deleteAppInfo(id);
	}

	public int updateOnOff(int id, int typeNumber, Date date) {
		return appInfoDao.updateOnOff(id, typeNumber, date);
	}

	public int pageCount(String softwareName, int status, int flatform,
			int categoryLevel1, int categoryLevel2, int categoryLevel3) {
		return appInfoDao.pageCount(softwareName, status, flatform, categoryLevel1, categoryLevel2, categoryLevel3);
	}

	public List<AppInfo> getAppInfos(String softwareName, int status,
			int flatform, int categoryLevel1, int categoryLevel2,
			int categoryLevel3, int pageIndex, int pageSize) {
		return appInfoDao.getAppInfos(softwareName, status, flatform, categoryLevel1, 
				categoryLevel2, categoryLevel3, pageIndex, pageSize);
	}

	public int updateStatus(int id, int valueId) {
		return appInfoDao.updateStatus(id, valueId);
	}

	

}
